package com.jye.cloud.user.service.impl;


import com.jye.cloud.domain.CommentsReply;
import com.jye.cloud.user.service.CommentsReplyService;
import com.jye.cloud.user.mapper.CommentsReplyMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class CommentsReplyServiceImpl implements CommentsReplyService {

    @Autowired
    CommentsReplyMapper commentReplyMapper;

    @Override
    public String commentComByComment(CommentsReply commentsReply) {
        try {
            commentsReply.setCreateTime(new Date());
            commentReplyMapper.addComentsReply(commentsReply);
            return "评论成功!";
        }catch (Exception e){
            return "评论失败!";
        }

    }
}
